Show the Autofill completion case as what would be auto-filled #22819
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partial Fix for scalameta/metals#7274
We have in our completion provider an option to automatically fill a case class constructor with named parameters:
However previously it was labeled
Autofill with default values
, which would never pass editors' filters based on thecurrent state of input (most likely the name of a field).
The only way to find this option was to type something matching the
Autofill with default values
label, which explains theauto
in the above issue.We now provide the actual provided fields as the label, so the above would show
x = ???, y = ???
instead, which is bothmore intuitive for the user, and more friendly to editors.
As a fallback, the hidden text sent to editors for filtering still containsAutofill with default values
, so typingauto
or any old variant would still work as before.